<script setup>
defineProps({
    data: Object
})
</script>

<template>
    <div v-loading="!data.success" element-loading-text="正在加载天气信息。。。。" style="height: 160px">
        <div v-if="data.success" style="display: flex;justify-content: space-between;margin: 10px 20px">
            <div style="font-size: 45px;color: grey">
                <i :class="`qi-${data.now.icon}-fill`"></i>
            </div>
            <div style="font-weight: bold;text-align: center">
                <div style="font-size: 25px">{{ data.now.temp }}</div>
                <div style="font-size: 15px">{{ data.now.text }}</div>
            </div>
            <div style="margin-top: 13px">
                <div style="font-size: 15px">{{ `${data.location.country} ${data.location.adm1}` }}</div>
                <div style="font-size: 14px;color: grey">{{ `${data.location.adm2} ${data.location.name}区` }}</div>
            </div>
        </div>
        <el-divider style="margin: 10px 0"/>
        <div style="display: grid;grid-template-columns: repeat(5, 1fr);text-align: center">
            <div v-for="item in 5">
                <div style="font-size: 13px">{{ item }}时</div>
                <div style="font-size: 23px">
                    <i class="qi-301-fill"></i>
                </div>
                <div style="font-size: 12px">20℃</div>
            </div>
        </div>
    </div>
</template>

<style scoped>

</style>